package com.wowudi.controller;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.wowudi.entity.Equipment;
import com.wowudi.entity.EquipmentRecords;
import com.wowudi.mapper.EquipmentRecordsMapper;
import com.wowudi.service.EquipmentRecordsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.math.BigDecimal;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;

@RestController
@RequestMapping("api/dept/equip")
public class EquipmentClassController {

    @Autowired
    private EquipmentRecordsService equipmentRecordsService;

    @Autowired
    private EquipmentRecordsMapper equipmentRecordsMapper;

    @RequestMapping("equiprecords")
    public List<EquipmentRecords> selectoutdep(String eqid) {
        QueryWrapper<EquipmentRecords> queryWrapper = new QueryWrapper<>();
        queryWrapper.in("eq_id", eqid);
        System.out.println(eqid);
        System.out.println(equipmentRecordsMapper.selectList(queryWrapper));
        return equipmentRecordsMapper.selectList(queryWrapper);
    }



}
